/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.repair.service;

import org.springblade.modules.repair.dto.PlanCheckHistoryListDTO;
import org.springblade.modules.repair.entity.MaintainCheckHistory;
import org.springblade.modules.repair.vo.MaintainCheckHistoryVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.repair.vo.PlanTemplateContentVO;
import org.springblade.modules.repair.vo.PlanTemplateVO;

import java.util.List;

/**
 * 点检内容历史记录 服务类
 *
 * @author BladeX
 * @since 2021-05-21
 */
public interface IMaintainCheckHistoryService extends BaseService<MaintainCheckHistory> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param maintainCheckHistory
	 * @return
	 */
	IPage<MaintainCheckHistoryVO> selectMaintainCheckHistoryPage(IPage<MaintainCheckHistoryVO> page, MaintainCheckHistoryVO maintainCheckHistory);

	/**
	 * 根据任务id 生成保养相关记录
	 * @param planId
	 * @return
	 */
	Boolean addHistory(Long planId);


	List<MaintainCheckHistoryVO> listCheckHistoryRecord(Long planId, Long locationTypeId);

	List<PlanTemplateVO> listPlanHistory(Long planId, Long tltId,Long templateId);

	Integer countPlanTemplateTypeContent(Long planId, Long templateId, Long tltId);

	List<PlanTemplateContentVO> getPlanWorkItemList(Long planId);

	List<PlanCheckHistoryListDTO> getCheckHistoryList(Long planId);

	/**
	 * 获取历史工作项的目标名称，按照排序
	 * @param planId 工单id
	 * @return 数据集
	 */
	List<String> getTemplateNames(Long planId);

    List<MaintainCheckHistory> listByPlanId(Long planId);

	Boolean updateDetail(MaintainCheckHistory maintainCheckHistory);

}
